package com.sparsearr.datastructures.itheima.choujiang;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Random;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/4/19 17:34
 * @Description: 抽奖
 * @Version: 1.0
 */

public class CopuCJ {
    private static final Logger logger = LogManager.getLogger(CopuCJ.class);

    public static void main(String[] args) {
        int[] arr = {2, 588, 888, 1000, 10000};

        Random r = new Random();

        for (int i = 0; i < arr.length; i++) {
            int index = r.nextInt(arr.length);
            int temp = arr[i];
            arr[i] = arr[index];
            arr[index] = temp;
        }

        for (int i = 0; i < arr.length; i++) {
            logger.info("arr[i] = {}", arr[i]);
        }

    }
}
